import React,{Component} from 'react'
import {HashRouter,Link,Route} from 'react-router-dom'
import Home from './home'
import About from './about'
import Topic from './topic'



export default class Router extends Component {
    render(){
        return (
            <HashRouter>
                <div>
                    <ul>
                        <li><Link to="/">Home</Link></li>
                        <li><Link to="/topic">Topic</Link></li>
                        <li><Link to="/about">About</Link></li>
                    </ul>
                    <hr />
                    <Route path="/" exact component={Home}></Route>
                    <Route path="/topic"  component={Topic}></Route>
                    <Route path="/about"  component={About}></Route>
                </div>
            </HashRouter>
        )
    }
}